﻿using Microsoft.Practices.Prism.Regions;
using Microsoft.Practices.Unity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using View1;

namespace VIew1.Views
{
    /// <summary>
    /// Interaction logic for Main.xaml
    /// </summary>
    public partial class MainView : UserControl
    {
        private readonly IUnityContainer container;
        private readonly IRegionManager rManager;

        public MainView(IUnityContainer c, IRegionManager r)
        {
            container = c;
            rManager = r;

            InitializeComponent();
        }

        private void RBT1_Click(object sender, RoutedEventArgs e)
        {
            Uri viewNav = new Uri("Product_1_View", UriKind.Relative);
            rManager.RequestNavigate(RegionNames.MainContentRegion, viewNav);
        }

        private void RBT2_Click(object sender, RoutedEventArgs e)
        {
            Uri viewNav = new Uri("Product_1_1_View", UriKind.Relative);
            rManager.RequestNavigate(RegionNames.MainContentRegion, viewNav);

        }

        private void RBT3_Click(object sender, RoutedEventArgs e)
        {
            Uri viewNav = new Uri("Product_1_2_View", UriKind.Relative);
            rManager.RequestNavigate(RegionNames.MainContentRegion, viewNav);

        }

        private void RBT4_Click(object sender, RoutedEventArgs e)
        {
            Uri viewNav = new Uri("Product_1_3_View", UriKind.Relative);
            rManager.RequestNavigate(RegionNames.MainContentRegion, viewNav);

        }
    }
}
